﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace RayTracer
{
    // RGB - Red Green Blue
    class Color
    {
        private double red;
        private double green;
        private double blue;

        // CONSTRUCTORS
        public Color()
        {
            // Black
            this.red = 0;
            this.green = 0;
            this.blue = 0;
        }

        public Color(double red, double green, double blue) 
        {
            this.red = red;
            this.green = green;
            this.blue = blue;
        }

        // PROPERTIES
        public double Red
        {
            get { return this.red; }
            set { this.red = value; }
        }

        public double Green
        {
            get { return this.green; }
            set { this.green = value; }
        }

        public double Blue
        {
            get { return this.blue; }
            set { this.blue = value; }
        }

        // METHODS
        public static Color operator +(Color c1, Color c2)
        {
            return new Color(c1.Red + c2.Red, c1.Green + c2.Green, c1.Blue + c2.Blue);
        }

        public static Color operator *(Color c1, Color c2)
        {
            return new Color(c1.Red * c2.Red, c1.Green * c2.Green, c1.Blue * c2.Blue);
        }

        public static Color operator *(Color c1, double coeficient)
        {
            return new Color(c1.Red * coeficient, c1.Green * coeficient, c1.Blue * coeficient);
        }
    }
}
